From: David Härdeman Date: Thu, 23 Oct 2025 17:02:33 +0000 (+0200) Subject: luci-mod-network: add an "IPv4 Settings" tab to interfaces X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22/%22https:/collectd.org/%22?a=commitdiff_plain;h=563d90cfb9a25743ac1dac9a7f5c377eeaf69686;p=project%2Fluci.git luci-mod-network: add an "IPv4 Settings" tab to interfaces And add one option to disable/enable odhcpd's DHCPv4 support. Signed-off-by: David Härdeman --- diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js index 8b49f5a720..29fe309828 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js @@ -669,6 +669,7 @@ return view.extend({ ss.tab('general', _('General Setup')); ss.tab('advanced', _('Advanced Settings')); + ss.tab('ipv4', _('IPv4 Settings')); ss.tab('ipv6', _('IPv6 Settings')); ss.tab('ipv6-ra', _('IPv6 RA Settings')); @@ -704,6 +705,16 @@ return view.extend({ ss.taboption('general', form.Flag, 'ignore', _('Ignore interface'), _('Disable DHCP for this interface.')); if (protoval == 'static') { + if (L.hasSystemFeature('odhcpd')) { + so = ss.taboption('ipv4', form.RichListValue, 'dhcpv4', _('DHCPv4 Service'), + _('Enable or disable DHCPv4 services on this interface (odhcpd only).')); + so.optional = true; + so.value('', _('disabled'), + _('Do not provide DHCPv4 services on this interface.')); + so.value('server', _('enabled'), + _('Provide DHCPv4 services on this interface.')); + } + so = ss.taboption('general', form.Value, 'start', _('Start', 'DHCP IP range start address'), _('Lowest leased address as offset from the network address.')); so.optional = true; so.datatype = 'or(uinteger,ip4addr("nomask"))';